﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using MongoDB.Bson;

namespace DataMongo.Entities
{
    public class Status
    {
        public ObjectId _id { get; set; }
        [Key]
        public int StatusId { get; set; }
        public int UserId { get; set; }
        public string StatusText { get; set; }
        public string PhotoURl { get; set; }
        public string VideoUrl { get; set; }
        public int LikeCount { get; set; }
        public int ShareCount { get; set; }
        public int CommentCount { get; set; }
        public bool IsDeleted { get; set; }
        public DateTime CreatedDate { get; set; }
    }

    public class PostComment
    {

        public ObjectId _id { get; set; }
        public int CommentId { get; set; }
         public int CommentedBy { get; set; }
        public string CommentedByName { get; set; }
        public string   CommentedByAvatar { get; set; }
        public DateTime  CommentedDate  { get; set; }
      
        public string  Message { get; set; }
        public int PostId { get; set; }
    }

    public  class Post
    {
        public Post()
        {
            this.PostComments = new HashSet<PostComment>();
        }

        public ObjectId _id { get; set; }

        public int PostId { get; set; }
       
        public string Message { get; set; }
        public string Source { get; set; }
        public int PostedBy { get; set; }

        public int LikeCount { get; set; }

        public string LinkThumbnailUrl { get; set; }
        public int NoOfPhotoUpload { get; set; }
        public int AlbumId { get; set; }

        public int GroupId { get; set; }

        public System.DateTime PostedDate { get; set; }
       

        public virtual ICollection<PostComment> PostComments { get; set; }
    }

    public class PostViewModel
    {
        public Post Post { get; set; }
        public FeedSourceDetail FeedSourceDetail { get; set; }

        public string Source { get; set; }
    }
}